import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class SixQuestion {
    public static void main(String[] args) {

        int[] arr={1,2,3,4,5,6,7,8,9,3,2,4,5,6,7,4,32,2,1,1,4,6,3};
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        List<Integer> list = new ArrayList<>();
        for (int i = 0; i <arr.length ; i++) {
            if (!list.contains(arr[i])){
                list.add(arr[i]);
            }
        }
        System.out.println(list);

        Object[] arrs=list.toArray();

        for ( Object Arrs: arrs ) {
            System.out.print(Arrs+" ");
        }

    }
}
